package Controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import View.MainFrame;
import View.PanelHolder;
import View.PanelLogin;
import View.PanelMenuBar;

public class Uitloggen implements ActionListener {

	
	public void actionPerformed(ActionEvent e) {
		
		MainFrame frame = MainFrame.getInstance();
		
		if(e.getActionCommand().equals("logout")){
				
		frame.remove(PanelHolder.getInstance());
		PanelHolder.selfDestroy();
		frame.remove(PanelMenuBar.getInstance());
		PanelMenuBar.selfDestory();
		frame.add(PanelLogin.getInstance());
		frame.repaint();
		frame.validate();
		
		}
	}

}
